package com.zhang.service;

import com.zhang.entity.SeckillProduct;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zhang.entity.UserSeckillSkuInfo;
import com.zhang.result.RetVal;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author zbw
 * @since 2022-04-26
 */
@Service
public interface SeckillProductService extends IService<SeckillProduct> {

    SeckillProduct getSeckillById(@PathVariable Long skuId);

    //开始处理预下单逻辑
    void prepareSecKill(UserSeckillSkuInfo userSeckillSkuInfo);

    //5.判断用户是否具备抢购资格
    RetVal hasQualified(Long skuId, String userId);

    //6.返回秒杀确认页面需要的数据
    RetVal seckillConfirm(String userId);
}
